package com.old.people.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration//相当于spring配置文件，application.xml
public class ConfigBean
{
	
	@LoadBalanced
    @Bean //将方法的返回值作为SpringIOC容器中管理的bean
    //RestTemplate 是 SpringCloud 微服务和微服务调用的模板对象
    public RestTemplate getRestTemplate()
    {
         return new RestTemplate();
    }
}
